package main

import (
	"fmt"
	"github.com/spf13/cobra"
)

var api = cobra.Command{
	Use:   "api",
	Short: "命令描述简写",
	Long:  "命令描述完整版",
	RunE: func(cmd *cobra.Command, args []string) error {
		fmt.Println("call api command")
		return nil
	},
}

var export = cobra.Command{
	Use:   "export",
	Short: "命令描述简写",
	Long:  "命令描述完整版",
	RunE: func(cmd *cobra.Command, args []string) error {
		fmt.Println(args)
		fmt.Println("call export command")
		return nil
	},
}

func main() {
	api.AddCommand(&export)
	err := api.Execute()
	if err != nil {
		return
	}
}
